﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.WinControls.UI;

namespace MN.Framework.UI.Win.Controls
{
    public class MnDateTimePicker : RadDateTimePicker, IMnControl
    {
        public object getValue()
        {
            var dt = this.Value;
            System.Globalization.PersianCalendar shamsi = new System.Globalization.PersianCalendar();
            return string.Format("{0}/{1}/{2}", shamsi.GetYear(dt), shamsi.GetMonth(dt), shamsi.GetDayOfMonth(dt));
        }


        public void setValue(object value)
        {
            this.Text = value != null ? value.ToString() : string.Empty;
        }
    }
}
